<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/26
 * Time: 17:27
 */
namespace app\validate;
class TypeValidate{
    protected $rule = [
        'type_name'  => 'require|unique:type',
        'model_id'   => 'require',
    ];
    protected $message = [
        'type_name.require' => '栏目名称不能为空',
        'model_id.require'  => '栏目类型不能为空',
        'type_name.unique'  => '栏目名称不能重复'
    ];
    public function typeValidate(){
        $validate['rule']    = $this->rule;
        $validate['message'] = $this->message;
        return $validate;
    }
}